#ifndef __WIZ_BASE_TYPETRAITS_CHARTYPE_HPP__SHANHAOBO_19800429__
#define __WIZ_BASE_TYPETRAITS_CHARTYPE_HPP__SHANHAOBO_19800429__

#include <string>
#include "./WizBaseTypeTraitsRemoveAll.hpp"
#include "./WizBaseTypeTraitsIsSame.hpp"
#include "./WizBaseTypeTraitsIf.hpp"

namespace Wiz
{
    namespace TypeTraits
    {
        template<typename Type>
        struct CharType
        {
            typedef ::Wiz::TypeTraits::If_
            <
                ::Wiz::TypeTraits::Is::Same
                <
                    ::Wiz::TypeTraits::Remove::All<Type>,
                    wchar_t
                >,
                wchar_t,
                char
            > tType;
        };
        /// ::std::string  => typedef  char tType
        /// ::std::wstring => typedef wchar tType
        template<class CharT, class Traits, class Alloc>
        struct CharType< ::std::basic_string<CharT, Traits, Alloc> >
        {
            typedef CharT tType;
        };
    } /// end of namespace TypeTraits
} /// end of namespace Wiz

#endif /*__WIZ_BASE_TYPETRAITS_CHARTYPE_HPP__SHANHAOBO_19800429__*/
